bitkeeper revision 1.787 (4051bc4ehrQHo7L4maQXzA3WoPbfmw)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 12 Mar 2004 13:34:06 +0000 (13:34 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 12 Mar 2004 13:34:06 +0000 (13:34 +0000)
setup.c, config.in:
  Detect and support VIA C3 processors.

xen/arch/i386/setup.c
xenolinux-2.4.25-sparse/arch/xeno/config.in
xenolinux-2.4.25-sparse/arch/xeno/kernel/setup.c

index 95b02926256107245eb6313be4e14c8489fa7b36..aaf4fbea59eacc3fd07a76fc3c8fa298cc0d9c68 100644 (file)
@@ -203,8 +203,11 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
         break;
     case X86_VENDOR_UNKNOWN:  /* Connectix Virtual PC reports this */
        break;
+    case X86_VENDOR_CENTAUR:
+        break;
     default:
-        panic("Only support Intel processors (P6+)\n");
+        printk("Unknown CPU identifier (%d): continuing anyway, "
+               "but might fail.\n", c->x86_vendor);
     }
        
     printk("CPU caps: %08x %08x %08x %08x\n",
index 0bc6d0867df74e04d7f6fda2b05074cf6258ebad..57e339165bbbb2ff4d01d5d11ebb09bb42b532ef 100644 (file)
@@ -39,7 +39,9 @@ choice 'Processor family' \
        "Pentium-Pro/Celeron/Pentium-II         CONFIG_M686 \
         Pentium-III/Celeron(Coppermine)        CONFIG_MPENTIUMIII \
         Pentium-4                              CONFIG_MPENTIUM4 \
-        Athlon/Duron/K7                        CONFIG_MK7" Pentium-Pro
+        Athlon/Duron/K7                        CONFIG_MK7 \
+        Opteron/Athlon64/Hammer/K8             CONFIG_MK8 \
+        VIA-C3-2                               CONFIG_MVIAC3_2" Pentium-Pro
 
    define_bool CONFIG_X86_WP_WORKS_OK y
    define_bool CONFIG_X86_INVLPG y
@@ -64,10 +66,16 @@ fi
 if [ "$CONFIG_MPENTIUM4" = "y" ]; then
    define_int  CONFIG_X86_L1_CACHE_SHIFT 7
 fi
+if [ "$CONFIG_MK8" = "y" ]; then
+   define_bool CONFIG_MK7 y
+fi
 if [ "$CONFIG_MK7" = "y" ]; then
    define_int  CONFIG_X86_L1_CACHE_SHIFT 6
    define_bool CONFIG_X86_USE_3DNOW y
 fi
+if [ "$CONFIG_MVIAC3_2" = "y" ]; then
+   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
+fi
 
 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
    tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD
index 4b12a14827d0826f822959027a5dc606fd8d5dc5..762a9946ae1d730b740c2ce1f5bb53fc656728e3 100644 (file)
@@ -48,6 +48,7 @@
 #include <linux/netdevice.h>
 #include <linux/rtnetlink.h>
 #include <linux/tqueue.h>
+#include <net/pkt_sched.h> /* dev_(de)activate */
 
 /*
  * Point at the empty zero page to start with. We map the real shared_info
@@ -444,6 +445,39 @@ static void __init display_cacheinfo(struct cpuinfo_x86 *c)
            l2size, ecx & 0xFF);
 }
 
+static void __init init_c3(struct cpuinfo_x86 *c)
+{
+    /* Test for Centaur Extended Feature Flags presence */
+    if (cpuid_eax(0xC0000000) >= 0xC0000001) {
+        /* store Centaur Extended Feature Flags as
+         * word 5 of the CPU capability bit array
+         */
+        c->x86_capability[5] = cpuid_edx(0xC0000001);
+    }
+   
+    switch (c->x86_model) {
+    case 9:    /* Nehemiah */
+    default:
+        get_model_name(c);
+        display_cacheinfo(c);
+        break;
+    }
+}
+
+static void __init init_centaur(struct cpuinfo_x86 *c)
+{
+    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
+       3DNow is IDd by bit 31 in extended CPUID (1*3231) anyway */
+    clear_bit(0*32+31, &c->x86_capability);
+  
+    switch (c->x86) {
+    case 6:
+        init_c3(c);
+        break;
+    default:
+        panic("Unsupported Centaur CPU (%i)\n", c->x86);
+    }
+}
 
 static int __init init_amd(struct cpuinfo_x86 *c)
 {
@@ -630,6 +664,8 @@ void __init get_cpu_vendor(struct cpuinfo_x86 *c)
         c->x86_vendor = X86_VENDOR_INTEL;
     else if (!strcmp(v, "AuthenticAMD"))
         c->x86_vendor = X86_VENDOR_AMD;
+    else if (!strcmp(v, "CentaurHauls"))
+        c->x86_vendor = X86_VENDOR_CENTAUR;
     else
         c->x86_vendor = X86_VENDOR_UNKNOWN;
 }
@@ -819,8 +855,12 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
         init_intel(c);
         break;
 
+    case X86_VENDOR_CENTAUR:
+        init_centaur(c);
+        break;
+        
     default:
-        panic("Unsupported CPU vendor\n");
+        printk("Unsupported CPU vendor (%d) -- please report!\n");
     }
        
     printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n",